<!DOCTYPE HTML>
<html>
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-calendar.css" />
    <title>calendar</title>
    </head>
<body>
    <div class="aui-tips aui-tips-primary">
        <div class="aui-tips-content aui-ellipsis-1">
            当前选择的日期为：<span id="result"></span>
        </div>
    </div>
    <div id="calendar" class="aui-content aui-calendar"></div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/aui-tap.js"></script>
<script type="text/javascript" src="../script/aui-calendar.js"></script>
<script type="text/javascript">
    apiready = function(){
    }
    var todayDate = new Date();
    var startDate = todayDate.getFullYear()+'-'+(todayDate.getMonth()+1)+'-'+todayDate.getDate();
    var endDate = (todayDate.getFullYear())+'-'+(todayDate.getMonth()+5);
    var calendar = new auiCalendar({
        container:document.getElementById("calendar"),
        startDate:startDate,
        endDate:endDate,
        lunarShow:true,
        dateActive:dateActive,
        beforeStartDateClick:false
    });
    function dateActive(date){
        document.getElementById("result").textContent = date;
    }
</script>
</html>
